
Remove an HTTP App Server servicing the MarkLogic REST API. Optionally, also remove the attached database and forests.
Upon success, MarkLogic Server return status 202 (Appserver deleted). The response body contains XML configuration information that you can use with the REST management API to confirm removal of all related resources.
rest-admin role, or the
following privileges:
http://marklogic.com/xdmp/privileges/rest-admin
http://marklogic.com/xdmp/privileges/rest-writer
http://marklogic.com/xdmp/privileges/rest-reader
NOTE: This request causes a MarkLogic Server restart.
NOTE: If you use the include parameter to tear
down the content database and/or the modules database, any data in
the removed database is lost.
The name component of the request URI should be the name of
an HTTP App Server created by making a POST request to
/rest-apis. See "POST /v1/rest-apis".
It may not be possible to remove all requested resource. For example,
if you include the content database (include=content)
and the database is in use by another App Server, it will not be deleted.
The request returns 202 (Appserver deleted) in all cases and provides
additional configuration information that you can use with the REST
Management API to confirm removal if necessary. To learn more, see
Using the Management API in the Monitoring MarkLogic Guide.
If you do not include a group parameter and there is
more than one instance or App Server in the cluster with the requested
name, MarkLogic Server returns status 400 (Bad Request).
For more details, see Removing an Instance in the REST Application Developer's Guide.
curl --anyauth --user user:password -X DELETE -i \
http://localhost:8002/v1/rest-apis/RESTstop
==> The REST service named "RESTstop" is deleted. MarkLogic Server
returns the following headers in the response:
Content-type: text/html; charset=UTF-8
Server: MarkLogic
Content-Length: 2002
Connection: close
HTTP/1.1 204 Appserver deleted
Server: MarkLogic
Content-Length: 0
Connection: close
<cluster-query
xsi:schemaLocation="http://marklogic.com/manage/clusters manage-clusters.xsd"
xmlns="http://marklogic.com/manage/clusters"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
...
</cluster-query>
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.